﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Noftware.Com.Cryptography
{
    /// <summary>
    /// Settings for key generation.
    /// </summary>
    public class KeySettings
    {
        /// <summary>
        /// Length of Key to generate. Not valid for GUID keys.
        /// </summary>
        private int _keyLength = 8;

        /// <summary>
        /// Length of Key to generate. Not valid for GUID keys.
        /// </summary>
        public int KeyLength
        {
            get { return _keyLength; }
            set
            {
                if (value < 0)
                {
                    value = 1;
                } 
                _keyLength = value;
            }
        }

        /// <summary>
        /// Type of key.
        /// </summary>
        public KeyType KeyType { get; set; }

        /// <summary>
        /// Casing of keys that have alpha characters.
        /// </summary>
        public KeyCase KeyCase { get; set; }
    }
}
